package za.org.jcicada.genss.alarm;



/**
 * IAlarmSubject.java
 *
 * @author Simon Cross
 *
 * Created on November 11, 2008, 14:09
 */


/**
 * Interface for interacting with the alarms present in a generic
 * software subsystem.
 */
public interface IAlarmSubject {

    /**
     * Attach an observer to all the alarms.
     * @param observer the observer requesting the attach
     */
    void requestAttach(IAlarmObserver observer);

    /**
     * Detach an observer from all the alarms.
     * @param observer the observer requesting the detach
     */
    void requestDetach(IAlarmObserver observer);

    /**
     * Request that the set of alarms present on this sensor be sent.
     * @param observer the observer requesting the alarm set
     */
    void requestAlarmSet(IAlarmObserver observer);

    /**
     * @todo What is getReport intended to return?
     */
    void requestReport(IAlarmObserver observer);

    /**
     * Let the subsystem know that an operator has seen the alarm.
     * @param observer the observer acknowledging the alarm
     * @param alarmURI the URI of the alarm being acknowledged
     */
    void requestAcknowledgeAlarm(IAlarmObserver observer, AlarmURN alarmURN);
    
    /**
     * Inform the subject that the observer has disconnected.
     */
    void informDisconnect(IAlarmObserver observer);
    
}
